import { useStore1 } from "../../../store/storre1";

const Controls: React.FC = () => {
  const increasePopulation = useStore1<any>(
    (state: any) => state.increasePopulation
  );
  return <button onClick={increasePopulation}>one up</button>;
};

// 重写后的组件
export const BearCounter: React.FC = () => {
  const bears = useStore1<any>((state: any) => state.bears);
  return <h1>{bears} bears around here...</h1>;
};

export default Controls;
